<template>
  <van-swipe class="swiper" :autoplay="3000" :indicator-color="themeStore.primaryColor">
    <van-swipe-item v-for="(item, index) in swipers" :key="index">
      <img :src="item.carouselUrl">
    </van-swipe-item>
  </van-swipe>
</template>

<script setup>
import useThemeStore from '@/store/theme'

const props = defineProps({
  swipers: {
    type: Array,
    required: true,
    default: () => []
  }
})

const themeStore = useThemeStore()
</script>

<style lang="less" scoped>
.swiper {
  img {
    width: 100%;
    height: 100%;
  }
}
</style>